{extend name="public/base"}
{block name='main'}
<form class="layui-form layui-form-pane" action="" style="padding:20px;">
  <input name="id" type="hidden" value="{$info.id|default=''}">
  <div class="layui-form-item">
    <label class="layui-form-label">导航名称</label>
    <div class="layui-input-block">
      <input type="text" name="name" lay-verify=“required” placeholder="请输入"  class="layui-input" value="{$info.name|default=''}">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">导航别名</label>
    <div class="layui-input-block">
      <input type="text" name="alias" placeholder="请输入" class="layui-input" value="{$info.alias|default=''}">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">链接地址</label>
    <div class="layui-input-block">
      <input type="text" name="link" placeholder="请输入" class="layui-input" value="{$info.link|default=''}">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">排序</label>
    <div class="layui-input-block">
      <input type="number" name="ordid" placeholder="请输入" class="layui-input" value="{$info.ordid|default='0'}">
    </div>
  </div>
  <div class="layui-form-item"  pane="">
    <label class="layui-form-label" >导航位置</label>
    <div class="layui-input-block">
      <input type="radio" title="主导航" name="type" value="main" {eq name="info.type|default='main'" value="main"}checked="checked"{/eq}>
      <input type="radio" title="底部导航" {eq name="$info.type|default=''" value="bottom"}checked="checked"{/eq} name="type" value="bottom" >
    </div>
  </div>
  <div class="layui-form-item"  pane="">
    <label class="layui-form-label">新窗口打开</label>
    <div class="layui-input-block">
      <input type="radio" title="是" name="target" value="1"  {eq name="$info.target|default='1'" value="1"}checked="checked"{/eq}>
      <input type="radio" title="否" name="target" value="0" {eq name="$info.target|default='1'" value="1"}checked="checked"{/eq} >
    </div>
  </div>
  <div class="layui-form-item"  pane="">
    <label class="layui-form-label">是否启用</label>
    <div class="layui-input-block">
      <input type="radio" title="是" name="status" value="1"  {eq name="$info.status|default='1'" value="1"}checked="checked"{/eq}>
      <input type="radio" title="否" name="status" value="0"  {eq name="$info.status|default='0'" value="0"}checked="checked"{/eq}>
    </div>
  </div>
  <div class="layui-form-item">
    <label class=""></label>
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit="" lay-filter="content_edit">提交保存</button>
    </div>
  </div>
</form>
<script>
  layui.use(['layer','jquery','form','element','layedit'], function () {

    //参数：layui、名称、更新的formid、更新的url：module/method、更新后跳转的url（为空则不跳转）、编辑器id、标签id（为空则不获取）
    Oper.initUpdate(layui, '导航', 'content_edit', 'nav/add');
  });
</script>
{/block}